<%@page import="Project.BoardVO"%>
<%@page import="java.util.ArrayList"%>
<%@page import="Project.BoardDTO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<script src="../3js/board.js"></script>

</head>
<body>
<form name="hiddenFrm" method="post">
	<input type="hidden" name="nowPage" />
	<input type="hidden" name="find" value=""/>

</form>

<jsp:useBean id="vo" class="Project.BoardVO" scope="page"/>
<jsp:setProperty property="*" name="vo"/>

<%
BoardDTO dto=new BoardDTO();
dto.setVo(vo);
ArrayList<BoardVO> al = dto.select();
%>

<div id="master">
	<div id="master_list_title">
		<div class="master_list_title">제목</div>
		<div class="master_list_masterid">작성자</div>
		<div class="master_list_masterdate">작성일</div>
	</div>
<input type="button" value="작성하기" id="btnminput"/>
</div>



------------------------------------------------
<div id="user">
	<div id="user_list_title">
		<div class="user_list_rno">순번</div>
		<div class="user_list_photo">이미지</div>
		<div class="user_list_title">제목</div>
		<div class="user_list_udate">작성일</div>

	</div>
	<div id="user_list_find">
	<form action="../3jsp/list.jsp" method="post" name="master_list_frm">
	<% for(int a=0;a<al.size();a++ ){ 
	BoardVO v=al.get(a);
	%>
	<div class="user_list_items">
		<div class="user_list_rno"><%=v.getRno() %>a</div>
		<div class="user_list_photo">
			<a href="#" onclick="goView(<%=dto.getNowPage()%>,<%=v.getRno()%>)">
			<%=v.getPhoto()%>
			</a>
		</div>
		<div class="user_list_title">
			<a href="#" onclick="goView(<%=dto.getNowPage()%>,<%=v.getRno()%>)">
			<%=v.getTitle() %>
			</a>
		</div>
		<div class="user_list_udate"><%=v.getUdate() %></div>
	
	</div>	
	<!-- 여기까지가...... 목록 -->
	<%} if(dto.getStartPage()>1){%>
	<div id="list_page">
	<a href="#" onclick="goPage(1)">맨 처음</a>
	<a href="#" onclick="goPage(<%=dto.getStartPage()-1 %>)" >이전</a>
	<%}
	int i=0;
	for(i=dto.getStartPage(); i<=dto.getEndPage();i++){	
	%>
		<a href="#" onclick="goPage(<%=i%>)"><%=i %></a>
	<%} %>
	<%if(i<=dto.getTotPage()){ %>
	<a href="#" onclick="goPage(<%=i%>)" >다음</a>
	<a href="#" onclick="goPage(<%=dto.getTotPage() %>)">맨끝</a>
	<%} %>
	<br/>
		<input type="text" name="find"  value='<%=vo.getFind() %>' />
		<input type="submit" value="검색"/>
	</div>
	</form>
</div>
<input type="button" value="작성하기" id="btninput"/>
</div>
</body>
<script>listinit();</script>
</html>